package com.swufe.myapplication;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;

import androidx.annotation.NonNull;

public class LoginActivity extends MainActivity {
    private static final String TAG = "login";
    protected void onCreate(Bundle savedInstanceState){
        super.onCreate(savedInstanceState);
        Log.i(TAG, "onCreate: 2022/5/22");
        setContentView(R.layout.login);
        Button button1 = (Button)findViewById(R.id.button1);
        Button button2 = (Button)findViewById(R.id.button2);
        if (button1 != null){
            button1.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {
                    Intent intent1 = new Intent(LoginActivity.this,MainActivity.class);
                    startActivity(intent1);
                }
            });
        }if (button2 != null){
            button2.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {
                    Intent intent2 = new Intent(LoginActivity.this,MainActivity2.class);
                    startActivity(intent2);
                }
            });
        }
    }

}
